
import { UserService } from './user.service';
import {
  Get,
  Request,
  Post,
  Body,
  Put,
  Param,
  Delete,
  Query,
  Controller
} from '@nestjs/common';

@Controller('user')
export class UserController {
  constructor(private UserService: UserService) {}
  @Post('info')
  login(@Body() body:any) {
    return this.UserService.loginS(body);
  }
  @Get('list')
  getUserList(@Query() rquey: any) {
    return this.UserService.getUserList(rquey);
  }
  @Post('add')
  addUser(@Body() body) {
    return this.UserService.addUser(body);
  }
  @Put('invalid/:id')
  setInvalidUsers(@Param() param: any) {
    return this.UserService.setInvalidUsers(param);
  }
  @Delete('delete')
  deleteUser(@Query() query: any) {
    return this.UserService.deleteUser(query);
  }
}
